package com.jinxinol.basic.system.web;

import java.util.Map;

import javax.servlet.http.HttpSession;

import com.jinxinol.core.common.BaseAction;
import com.jinxinol.core.common.ContextHelper;

/**
 * 
 * @company Jinxin Computer Corp.
 * @author Chenbing
 * @email wwwchenbing@gmail.com
 * @description 用户退出系统
 * @date 2012-7-12
 */
public class LogoutAction extends BaseAction {
	private static final long serialVersionUID = -8004959989512432543L;
		
	/**
	 * 退出
	 * */
	public String logout(){
		//清空SessionMap
		Map<String, Object> sessionMap = ContextHelper.getSessionMap();
		sessionMap.clear();
		
		//使HttpSession无效
		HttpSession session = ContextHelper.getSession();
		session.invalidate();
		
		return LOGIN;
	}
}
